package com.suning.sawp.dto.customer;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.suning.sawp.po.customer.ClerkCustInfo;
/**
 * 
 * 会员拓展之客户资料详情<br> 
 * 〈功能详细描述〉
 *
 * @author 12061818
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
public class CustInfoDetailDto implements Serializable {

    /**
     */
    private static final long serialVersionUID = 9136395447633675693L;
    /**
     * 客户关系ID
     */
    private Long custRelId;
    /**
     * 加密会员
     */
    private String custNo;
    /**
     * 客户ID
     */
    private Long custId;
    /**
     * 客户来源
     * 1-外拓，2-到店，3-熟人
     */
    private String custSource;
    /**
     * 客户评级ID
     */
    private Long rateId;
    /**
     * 标签列表
     */
    private List<CustLabel> labels;
    // 兼容外拓下会员老接口
    private List<CustLabel> custLabels;
    /**
     * 密文手机号
     */
    private String mobile;
    /**
     * 客户意向商品列表
     */
    private List<CustWillComm> willComms;
    /**
     * 客户备注
     */
    private String remark;
    /**
     * 客户备注姓名
     */
    private String remarkName;
    /**
     * 熟人姓名
     */
    private String acqName;
    /**
     * 熟人手机号
     */
    private String acqMobile;
    /**
     * 客户生日
     */
    private String birthday = "";
    /**
     * 客户等级
     */
    private String custLevel = "";
    /**
     * 客户会员头像地址
     */
    private String headPicUrl = "";
    /**
     * 是否为重点客户
     */
    private Integer isKeyCust;
    /**
     * 是否为会员
     */
    private Integer isMember;
    /**
     * 客户评级名称
     */
    private String rateName;
    //-----兼容老版本
    private Long custRating;
    private String custRatingName;
    //-----
    /**
     * 地点任务ID
     */
    private Long taskId;
    
    /**
     * 1-需要跟进，0-不需要跟进
     */
    private String waitFollow;
    
    /**
     * 工号
     */
    private String staffId;
    
    /**
     * 店员姓名
     */
    private String staffName;
    
    /**
     * 门店编码
     */
    private String storeCode;
    
    /**
     * 会员画像地址
     */
    private String memberPortraitUrl;
    
    /**
     * 购物状态 0-未购物；1-首购；2-复购
     */
    private String shopStatus;
    
    /**
     * 加密手机号
     */
    private String encryptMobile;
    /**
     * 外拓活动ID
     */
    private Long actId;
    /**
     * 记录创建时间
     */
    private Date createTime;
    /**
     * 预计购买金额
     */
    private String orderBuyNum;
    /**
     * 预计购买时间
     */
    private String orderBuyTime;
    /**
     * 预计购买时间
     */
    private String arriveTime;
    
    
    public String getArriveTime() {
        return arriveTime;
    }
    public void setArriveTime(String arriveTime) {
        this.arriveTime = arriveTime;
    }
    public String getOrderBuyNum() {
        return orderBuyNum;
    }
    public void setOrderBuyNum(String orderBuyNum) {
        this.orderBuyNum = orderBuyNum;
    }
    public String getOrderBuyTime() {
        return orderBuyTime;
    }
    public void setOrderBuyTime(String orderBuyTime) {
        this.orderBuyTime = orderBuyTime;
    }
    public Long getCustId() {
        return custId;
    }
    public void setCustId(Long custId) {
        this.custId = custId;
    }
    public Long getCustRelId() {
        return custRelId;
    }
    public void setCustRelId(Long custRelId) {
        this.custRelId = custRelId;
    }
    public String getCustNo() {
        return custNo;
    }
    public void setCustNo(String custNo) {
        this.custNo = custNo;
    }
    public String getCustSource() {
        return custSource;
    }
    public void setCustSource(String custSource) {
        this.custSource = custSource;
    }
    public Long getRateId() {
        return rateId;
    }
    public void setRateId(Long rateId) {
        this.rateId = rateId;
    }
    public List<CustLabel> getLabels() {
        return labels;
    }
    public void setLabels(List<CustLabel> labels) {
        this.labels = labels;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public List<CustWillComm> getWillComms() {
        return willComms;
    }
    public void setWillComms(List<CustWillComm> willComms) {
        this.willComms = willComms;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public String getRemarkName() {
        return remarkName;
    }
    public void setRemarkName(String remarkName) {
        this.remarkName = remarkName;
    }
    public String getAcqName() {
        return acqName;
    }
    public void setAcqName(String acqName) {
        this.acqName = acqName;
    }
    public String getAcqMobile() {
        return acqMobile;
    }
    public void setAcqMobile(String acqMobile) {
        this.acqMobile = acqMobile;
    }
    public String getBirthday() {
        return birthday;
    }
    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
    public String getCustLevel() {
        return custLevel;
    }
    public void setCustLevel(String custLevel) {
        this.custLevel = custLevel;
    }
    public String getHeadPicUrl() {
        return headPicUrl;
    }
    public void setHeadPicUrl(String headPicUrl) {
        this.headPicUrl = headPicUrl;
    }
    public Integer getIsKeyCust() {
        return isKeyCust;
    }
    public void setIsKeyCust(Integer isKeyCust) {
        this.isKeyCust = isKeyCust;
    }
    public Integer getIsMember() {
        return isMember;
    }
    public void setIsMember(Integer isMember) {
        this.isMember = isMember;
    }
    public String getRateName() {
        return rateName;
    }
    public void setRateName(String rateName) {
        this.rateName = rateName;
    }
    public Long getTaskId() {
        return taskId;
    }
    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }
    public String getWaitFollow() {
        return waitFollow;
    }
    public void setWaitFollow(String waitFollow) {
        this.waitFollow = waitFollow;
    }
    public String getStaffId() {
        return staffId;
    }
    public void setStaffId(String staffId) {
        this.staffId = staffId;
    }
    public String getStaffName() {
        return staffName;
    }
    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }
    public String getStoreCode() {
        return storeCode;
    }
    public void setStoreCode(String storeCode) {
        this.storeCode = storeCode;
    }
    public String getMemberPortraitUrl() {
        return memberPortraitUrl;
    }
    public void setMemberPortraitUrl(String memberPortraitUrl) {
        this.memberPortraitUrl = memberPortraitUrl;
    }
    public String getShopStatus() {
        return shopStatus;
    }
    public void setShopStatus(String shopStatus) {
        this.shopStatus = shopStatus;
    }
    public String getEncryptMobile() {
        return encryptMobile;
    }
    public void setEncryptMobile(String encryptMobile) {
        this.encryptMobile = encryptMobile;
    }
    public Long getCustRating() {
        return custRating;
    }
    public void setCustRating(Long custRating) {
        this.custRating = custRating;
    }
    public String getCustRatingName() {
        return custRatingName;
    }
    public void setCustRatingName(String custRatingName) {
        this.custRatingName = custRatingName;
    }
    public List<CustLabel> getCustLabels() {
        return custLabels;
    }
    public void setCustLabels(List<CustLabel> custLabels) {
        this.custLabels = custLabels;
    }
    public Long getActId() {
        return actId;
    }
    public void setActId(Long actId) {
        this.actId = actId;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public interface WaitFollow {
        String YES = "1";
        String NO = "0";
    }
    
    public interface IsMember {
        int YES = 1;
        int NO = 0;
    }
    
    @Override
    public String toString() {
        return "CustInfoDetailDto [custRelId=" + custRelId + ", custNo=" + custNo + ", custId=" + custId
                + ", custSource=" + custSource + ", rateId=" + rateId + ", labels=" + labels + ", custLabels="
                + custLabels + ", mobile=" + mobile + ", willComms=" + willComms + ", remark=" + remark
                + ", remarkName=" + remarkName + ", acqName=" + acqName + ", acqMobile=" + acqMobile + ", birthday="
                + birthday + ", custLevel=" + custLevel + ", headPicUrl=" + headPicUrl + ", isKeyCust=" + isKeyCust
                + ", isMember=" + isMember + ", rateName=" + rateName + ", custRating=" + custRating
                + ", custRatingName=" + custRatingName + ", taskId=" + taskId + ", waitFollow=" + waitFollow
                + ", staffId=" + staffId + ", staffName=" + staffName + ", storeCode=" + storeCode
                + ", memberPortraitUrl=" + memberPortraitUrl + ", shopStatus=" + shopStatus + ", encryptMobile="
                + encryptMobile + ", actId=" + actId + ", createTime=" + createTime + ", orderBuyNum=" + orderBuyNum
                + ", orderBuyTime=" + orderBuyTime +    ", arriveTime=" + arriveTime+  "]";
    }
    /**
     * 
     * 功能描述: 校验参数合法性<br>
     * 〈功能详细描述〉
     *
     * @return
     * @see [相关类/方法](可选)
     * @since [产品/模块版本](可选)
     */
    public boolean checkParams() {
        if (null == this.custRelId) {
            // 新增
            if (StringUtils.isBlank(this.custSource) || 
                    StringUtils.isBlank(this.mobile)) {
                return false;
            } else {
                if (ClerkCustInfo.CustSource.ACQ_RECOMMEND.equals(this.custSource)) {
                    // 熟人推荐，熟人手机号、熟人姓名不可为空
                    if (StringUtils.isBlank(this.acqMobile) ||
                            StringUtils.isBlank(this.acqName)) {
                        return false;
                    }
                } else if (ClerkCustInfo.CustSource.OUT_DEV.equals(this.custSource)) {
                    // 外拓关系，地点任务ID不可为空
                    if (null == this.taskId) {
                        return false;
                    }
                }
            }
        } else {
            // 修改
            if (StringUtils.isBlank(this.custSource)) {
                return false;
            }
        }
        return true;
    }
}
